<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="jQuery" />
<meta name="description" content="Helloweba演示平台，演示XHTML、CSS、jquery、PHP案例和示例" />
<title>演示：basicContext.js-为您的web应用添加强大的上下文（右键）菜单</title>
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css">
<link rel="stylesheet" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link rel="stylesheet" href="dist/basicContext.min.css">
<link rel="stylesheet" href="dist/themes/default.min.css">
</head>
<body>
<div class="container">
	<header>
		<div class="row">
			<div class="col-md-3 col-xs-12"><h1 class="logo"><a href="http://www.helloweba.com" title="返回helloweba首页">helloweba</a></h1></div>
			<div class="col-md-9 text-right"></div>
		</div>
	</header>
	<div class="row main">
		<div class="col-md-12">
			<h2 class="top_title"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><a href="http://www.helloweba.com/view-blog-404.html">basicContext.js-为您的web应用添加强大的上下文（右键）菜单</a></h2>
			
			<div class="row" style="margin-top: 30px">
                <div class="col-md-12">
                    <ul class="nav nav-tabs" role="tablist">
                      <li role="presentation"><a href="index.html">Basic demo</a></li>
                      <li role="presentation"><a href="position.html">Position demo</a></li>
                      <li role="presentation"><a href="scroll.html">Scroll demo</a></li>
                      <li role="presentation"><a href="closeFunction.html">close function demo</a></li>
                      <li role="presentation" class="active"><a href="customPosition.html">Custom position demo</a></li>
                      <li role="presentation"><a href="jQuery.html">jQuery demo</a></li>
                    </ul>
                </div>
                <div class="col-md-12" style="text-align: center; margin: 40px auto">
                    <button type="button" class="btn btn-primary click">Click me!</button>
                </div>
			</div>

		</div>
	</div>
	<footer>
		<p>Powered by helloweba.com  允许转载、修改和使用本站的DEMO，但请注明出处：<a href="http://www.helloweba.com">www.helloweba.com</a></p>
	</footer>
</div>
<script src="dist/basicContext.min.js"></script>
<script>
var onClick = function() {

  var clicked = function() { alert('Item clicked!') }

  var e = {
    pageX: 10,
    pageY: 10
  }

  var items = [
    { title: 'Add Sites', icon: 'ion-plus-round', fn: clicked },
    { title: 'Reset Login', icon: 'ion-person', fn: clicked },
    { title: 'Help', icon: 'ion-help-buoy', fn: clicked },
    { title: 'Disabled', icon: 'ion-minus-circled', fn: clicked, disabled: true },
    { title: 'Invisible', icon: 'ion-eye-disabled', fn: clicked, visible: false },
    { },
    { title: 'Logout', icon: 'ion-log-out', fn: clicked }
  ]

  basicContext.show(items, e)

}

document.addEventListener('DOMContentLoaded', function() {

  document.querySelector('.click').addEventListener('click', onClick)

})
</script>
</body>
</html>